package cn.leelei.work;

import cn.leelei.work.entity.Goods;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class GoodsHandler  {

    @RequestMapping("/goods")
    public ModelAndView goods(Goods goods){
        ModelAndView modelAndView = new ModelAndView();
        System.out.println( goods.getName() +goods.getPrice());
        modelAndView.addObject("goods",goods);
        modelAndView.setViewName("show");
        return modelAndView;
    }


}
